{*-----------------------------------------------
	db_table_controller helper template


-------------------------------------------------*}
<form action="?" method="post">
	<input type="hidden" value="__db_ctrl_save"     name="db_action">
	<input type="hidden"   value="{$__CORE.module}" name="page">
	
	<table border="1">
		{foreach from=$WGT_TABLE_STRUCT item="struct"}
			{assign var="__field_name" value=$struct.name}
			<tr>
				<td>{$struct.name}</td>
			
				<td>
					{if $struct.type == "textarea"}
						<textarea name="__db_field_{$__field_name}">{$WGT_TABLE_DATA.$__field_name}</textarea>
					{elseif $struct.type == "file"}
					
					{elseif $struct.type == "label"}
						<span class="_label">{$WGT_TABLE_DATA.$__field_name}</span>
					{else}
						<input name="__db_field_{$__field_name}" type="text" value="{$WGT_TABLE_DATA.$__field_name}">
					{/if}
				</td>
			</tr>
		{/foreach}
		<tr>
			<td colspan="{$WGT_TABLE_STRUCT|@count}" align="center">
				<input type="submit" value="save">
			</td>
		</tr>
	</table>	
	
</form>	
	
	
